/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package am.aua.renju.databaseaccess;

import am.aua.renju.databaseaccess.util.GameState;
import am.aua.renju.entity.Game;
import am.aua.renju.entity.Player;
import java.util.List;

/**
 *
 * @author ara
 */
public interface IGameOperations {

    void createGame(Game game);

    List<Game> getPlayedGames(int userId);

    List<Game> getWaitGames();

    Game getGameById(int id);

    List<Game> getGames(Player userId);

    Game getWaitGame(Player player1Id, int time, short startRule);

    Game getWaitGame(Player player1, short startRules);

    Game getPlayGame(Player player1);

    void updateGameToJoin(int gameId, Player player2, short player1Color);

    void updateGameState(int id, GameState state);

    void deleteWaitGames(Player user);

    void deleteGames(Player user);

    public void close();

    public void deleteGame(Player email, int time, short s);
    
}
